import http from '@/utils/request.js';

// 获取考勤的组织结构
export const getSignDeptTree = (data) => {
	// return http.get('/blade-system/dept/signDeptTree', data);
	return http.request({
		url: '/blade-system/dept/signDeptTree',
		method: 'get',
		data,
	});
};

// 获取维保员统计信息
export const getUserSignDetail = (data) => {
	// return http.post('/repair/user/sign/getUserSignDetail', data, true);
	return http.request({
		url: '/repair/user/sign/getUserSignDetail',
		method: 'post',
		data,
		textJson: true,
	});
};

// 获取维保组长统计信息
export const getGroundSignDetail = (data) => {
	// return http.post('/repair/user/sign/getWorkUserSignDetail', data, true);
	return http.request({
		url: '/repair/user/sign/getWorkUserSignDetail',
		method: 'post',
		data,
		textJson: true,
	});
};

// 获取维保组长周月统计数据
export const getGroundWeekSignDetail = (data) => {
	// return http.post('/repair/user/sign/getDateUserSignDetail', data, true);
	return http.request({
		url: '/repair/user/sign/getDateUserSignDetail',
		method: 'post',
		data,
		textJson: true,
	});
};
// 获取休息日
export const getRestDayDetail = (data) => {
	// return http.get('/repair/maintainsigncalendar/detail', data);
	return http.request({
		url: '/repair/maintainsigncalendar/detail',
		method: 'get',
		data,
	});
};
// 获取休息日统计
export const getRestDayTotal = (data) => {
	// return http.post('/repair/user/sign/getRestUserSignDetail', data, true);
	return http.request({
		url: '/repair/user/sign/getRestUserSignDetail',
		method: 'post',
		data,
		textJson: true,
	});
};

// 获取最新的在职人员
export const getWorkUserList = (data) => {
	// return http.post('/repair/user/sign/getWorkUserList', data, true);
	return http.request({
		url: '/repair/user/sign/getWorkUserList',
		method: 'post',
		data,
		textJson: true,
	});
};

// 签到
// export const signIn = (data) => {
// 	return http.post('/repair/maintain/sign/in',data,1)
// }
